﻿using System.Collections.Generic;
using Web7.Ioc;

namespace Web7.Core.Security
{
    public interface IMemberShip : IDependency
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        IEnumerable<Role> GetRoleMemberOfUser(IUser user);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        IEnumerable<IUser> GetUserMemberOfRole(Role role);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="userNameOrEmail"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        IUser ValidateUser(string userNameOrEmail, string password);
    }
}
